#import "SampleApp.h"

@implementation SampleApp

- (void) applicationDidFinishLaunching: (id) unused
{
    UIWindow *window;
    struct CGRect rect = [UIHardware fullScreenApplicationContentRect];
    rect.origin.x = rect.origin.y = 0.0f;

    window = [[UIWindow alloc] initWithContentRect: rect];
    mainView = [[UIView alloc] initWithFrame: rect];
    textView = [[UITextView alloc]
        initWithFrame: CGRectMake(0.0f, 0.0f, 320.0f, 480.0f)];
    [textView setEditable:YES];
    [textView setTextSize:30];

    [window orderFront: self];
    [window makeKey: self];
    [window _setHidden: NO];
    [window setContentView: mainView];
    [mainView addSubview:textView];

    [textView setText:@"Hello ATS TEAM!\ntesting\ntesting\nlets see what this iphone can do"];
	//[delegate toggleKeyboard];
	//[mainView addSubview:keyboardView];
}

- (void) acceleratedInX: (float)x Y:(float)y Z:(float)z {
	printf("%f %f %f", x, y, z);
	//[NSString initFromFormat: "%f %f %f", x, y, z]
	//[textView setText:@"x:"+x+"y:"+y+"z:"+z];
	if(x == 50.0f)
	{
		[textView setText:@"STOP MOVING ME"];
	}
}

@end